package com.itheima.demo4;

import java.util.Random;

public class Demo4 {
    public static void main(String[] args) {
        Num num=(int a)->{
            Random r=new Random();
           int rad= r.nextInt(a);
            return rad;
        };
       int rad=num.getNum(10);
        System.out.println(rad);
    }
}
interface Num{
    int getNum(int a);
        }